package com.cino.org.domain;

import com.cino.basic.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Employee extends BaseDomain {
    private String username;
    private String phone;
    private String email;
    private String salt;
    private String password;
    //店铺入驻时填写的 二次确认的密码
    private String confirmPassword;
    private Integer age;
    private Integer state = 1;
    private Long department_id;
    private Long logininfo_id;
    private Long shop_id;
    private Long role_id;
    private String role_name;

    private Department department;
    //保存上级部门的信息
    private Department parent;
    //用于封装当前部门的子部门
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();
}
